1. Field of the Invention
The present invention relates to a transcoder and a method of transcoding, and more particularly to a transcoder for deciding a mode and a motion vector in a transcoding mode and a method of deciding a motion vector in a transcoding mode.
2. Description of the Related Art
A motion picture signal has a vast amount of data, thus data is transmitted or recorded after compression coding the motion picture signal and converting the motion picture signal into a bit stream. As one compression coding method, International Standards Organization (ISO) 11172 Motion Picture Experts Group (MPEG) is usually used.
FIG. 1 is a block diagram of a conventional transcoder. Referring to FIG. 1, the conventional transcoder comprises a VLD (variable length decoder) 101, IQs (inverse quantizers) 103a and 103b, IDCTs (inverse discrete cosine transformers) 105a and 105b, adders 107a and 107b, MCs (motion compensators) 109a and 109b, a subtractor 111, a DCT (discrete cosine transformer) 113, a quantizer 115, a VLC (variable length coder) 117, and a motion vector information transformer 119.
The VLD 101 reduces an entire amount of data flow by marking frequently generated data as a short sign and data not frequently generated as a relatively long sign. As an I picture, the VLD 101 reduces a considerable amount of bits in a picture that is constructed with only DCT coefficients. The VLD 101 performs Huffman coding for further reducing the amount of the bits.
The IQ 103a inverse quantizes the DCT coefficients coded by the VLD 101. The IQ 103a transmits the inverse quantized DCT coefficients to the IDCTs 105a. The IDCT 105a provides an estimation error signal, which is gained by inverse DCT converting the inverse quantized DCT coefficients, to the adder 107a. The adder 107a adds the estimation error signal input to the adder 107a and an MC estimation signal provided by the MC 109a. The ‘estimation’ means calculating a difference of pixel data between a frame and a field. In other words, a macro block having a best match data on a current frame and field and a macro block on a preceding frame and field is searched for, and a motion direction of the searched for macro block is detected by a motion vector.
From the input motion vector, the MC 109a estimates the motion compensation from the preceding frame or plural preceding frames by the order of coding, and transmits the MC estimation signal to the adder 107a. The adder 107a adds the input estimation error signal and the MC estimation signal, and transmits the added signal to the subtractor 111 via the integer scaler 110. The subtractor 111 subtracts a second MC estimation signal from the scaled estimation error signal, and provides a resulting estimation error signal as an input to the DCT 113. The DCT 113 DCT converts the input estimation error signal, and provides the gained DCT coefficients to the quantizer 115. The quantizer 115 quantizes the input DCT coefficients. The quantizer 115 provides the quantized DCT coefficients to the VLC 117 and at the same time to the IQ 103b. The IQ 103b inverse quantizes the input DCT coefficients. The IQ 103b provides the inverse quantized DCT coefficients to the IDCT 105b. The IDCT 105b inverse DCT converts the input DCT coefficients, and provides an estimation error signal as an input to the adder 107b. The adder 107b adds the input estimation error signal and the estimation signal, and provides the gained signal to the MC 109b. From the input motion vector, the MC 109b estimates the motion compensation from the preceding frame or the plural preceding frames by the order of the coding. That is, the MC 109b calculates an input motion vector with respect to consecutively input images, i.e., frames, and estimates a motion compensation based on the calculated motion vector. The order of the coding means an order of the input image signals being processed by the MC 109b. The MC 109b provides the gained estimation signal to the subtractor 111 and at the same time to the adder 107b. The VLC 117 variable length codes the input picture coding type, the motion vector, and the quantized DCT coefficients, and outputs a gained bit stream. The motion vector information transformer 119 transforms a value (MOTION VECTOR INFORMATION) provided by the VLD 101 to an appropriate form useable by a coder.
However, the conventional transcoder only supports for scaling 2N multiples or integral number multiples to re-use the motion vector from the input bit stream. Therefore, since the conventional transcoder, as shown in FIG. 2, does not consider scaling of non-integral number multiples, there is a shortcoming that the conventional transcoder is not suitable for an application of the transcoder that supports various resolutions. In addition, as shown in FIG. 3, the conventional transcoder considers only the motion vector in a motion estimation to reduce computational complexities, but does not consider computational requirements for deciding a macro block mode, thus application of the conventional transcoder is limited.